#div1>div{
    margin-left: 20%;
    margin-right: 20%;
    margin-top: 8px;
}
@media all and (orientation : portrait) {
    #div1>div{
        margin-left: 3%;
        margin-right: 3%;
    }

}